<template>
  <div>
    <!-- <input> -->
    <el-input placeholder="请输入内容" clearable v-model="searchText" class="input-with-select" 
      @keyup.enter.native="$emit('search', searchText)" @clear="$emit('clear')">
      <el-button slot="append" icon="el-icon-search" @click="$emit('search', searchText)"></el-button>
    </el-input>
  </div>
</template>
<script>
export default {
  data() {
    return {
      searchText: ''
    }
  },
  methods: {
    clearSearchText() {
      this.searchText = ''
    }
  }
}
</script>
<style scoped>

</style>